package jdbc3_25.homework;

import java.sql.Connection;
import java.sql.Statement;

public class JDBCDemo01 {
    public static void main(String[] args) {
        try (Connection connection = DBUtil01.getConnection()) {

            Statement statement = connection.createStatement();
            String sql = "CREATE TABLE user1(" +
                    "id INT PRIMARY KEY  AUTO_INCREMENT," +
                    "username VARCHAR(20) ," +
                    "password VARCHAR(20) ," +
                    "nickname VARCHAR(20) ," +
                    "age INT " +
                    ")";
            statement.execute(sql);
            System.out.println("创建成功");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}